package lab02.test17;

/**
 * Created by admin on 2017/10/26.
 */
public class Test {
    public static void main(String[] args) {
        int [] numbers=new int[10];
        numbers[0]=13;
        numbers[1]=2;
        numbers[2]=9;
        numbers[3]=10;
        numbers[4]=45;
        numbers[5]=5;
        numbers[6]=50;
        numbers[7]=32;
        numbers[8]=67;
        numbers[9]=90;
        //ctrl+d复制一行，ctrl+x删除一行
        //System.out.println(numbers[0]);
       // System.out.println(numbers[1]);
       // System.out.println(numbers[2]);
        //System.out.println(numbers[3]);
       //System.out.println(numbers[4]);
        int index;
        for (index=0;index<numbers.length;index++){
            System.out.println(numbers[index]);
        }
        int max=0;
        for (int i=0;i<numbers.length;i++){
            if (numbers[i]>max){
                max=numbers[i];
            }
        }
        System.out.println("max is:"+max);

        int min=100;
        for(int i=0;i<numbers.length;i++){
            if (numbers[i]<min){
                min=numbers[i];
            }
        }
        System.out.println("min is:"+min);

        int sum=0;
        for(int i=0;i<numbers.length;i++){
            sum+=numbers[i];
        }
        System.out.println("sum is:"+sum);

    }
}
